package com.zr.qkchat.data.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the user database table.
 * 
 */
@Entity
@NamedQuery(name="User.findAll", query="SELECT u FROM User u")
public class User implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	private String uid;

	private String name;

	@Column(name="photo_url")
	private String photoUrl;

	private short sex;

	//bi-directional many-to-one association to SingleMsg
	@OneToMany(mappedBy="fromUser")
	private List<SingleMsg> sendMsg;

	//bi-directional many-to-one association to SingleMsg
	@OneToMany(mappedBy="toUser")
	private List<SingleMsg> receiveMsg;

	public User() {
	}

	public String getUid() {
		return this.uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhotoUrl() {
		return this.photoUrl;
	}

	public void setPhotoUrl(String photoUrl) {
		this.photoUrl = photoUrl;
	}

	public short getSex() {
		return this.sex;
	}

	public void setSex(short sex) {
		this.sex = sex;
	}

	public List<SingleMsg> getSendMsg() {
		return this.sendMsg;
	}

	public void setSendMsg(List<SingleMsg> sendMsg) {
		this.sendMsg = sendMsg;
	}

	public List<SingleMsg> getReceiveMsg() {
		return this.receiveMsg;
	}

	public void setReceiveMsg(List<SingleMsg> receiveMsg) {
		this.receiveMsg = receiveMsg;
	}

}